{% extends "market/base.html" %}

{% block header %}

  {% if form.errors %}
    <p><strong>咒语记混了，请重新输入咒语 (i.e. QQWRV)</strong> </p>
  {% endif %}
  
{% endblock header %}

{% block content %}
  
  <form class="form-horizontal" method="post" action="{% url 'login' %}">
    {% csrf_token %}
    {{ from.as_p }}
    
    <div class="form-group">
      <td>{{ form.username.label_tag }}</td>
      <td>{{ form.username }}</td>
    </div>
    <div class="form-group">
      <td>{{ form.password.label_tag }}</td>
      <td>{{ form.password }}</td>
    </div>
    
    <div>
      <button name="submit" value="login" class="btn btn-default" style="float:left;margin-left:10px">登陆账户</button>
      <input type="hidden" name="next" value="{% url 'market:welcome' %}" />
      <button type="button" class="btn btn-default" style="float:left;margin-left:50px;">忘记密码</button>
    </div>
  </form>

{% endblock content %}


